package com.ruoyi.exam.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.exam.domain.ExamUserBankProgress;
import com.ruoyi.exam.vo.ExamUserBankProgressVo;
import com.ruoyi.exam.vo.UserBankProgressAndRecordVo;

import java.util.List;

/**
 * 用户题库进度Service接口
 *
 * @author Tellsea
 * @date 2025-06-23
 */
public interface IExamUserBankProgressService extends IService<ExamUserBankProgress> {

    /**
     * 分页查询
     *
     * @param entity
     * @return
     */
    TableDataInfo<ExamUserBankProgressVo> queryList(ExamUserBankProgressVo entity);

    /**
     * 查询全部
     *
     * @param entity
     * @return
     */
    List<ExamUserBankProgressVo> queryAll(ExamUserBankProgressVo entity);

    /**
     * 根据ID查询
     *
     * @param progressId
     * @return
     */
    ExamUserBankProgressVo queryById(Long progressId);

    /**
     * 根据用户ID和题库ID查询进度
     *
     * @param userId 用户ID
     * @param bankId 题库ID
     * @return
     */
    ExamUserBankProgressVo getByUserIdAndBankId(Long userId, Long bankId);

    /**
     * 获取用户题库进度和答题记录
     *
     * @param userId 用户ID
     * @param bankId 题库ID
     * @return
     */
    UserBankProgressAndRecordVo getUserProgressAndRecords(Long userId, Long bankId);
}
